﻿@model CMS.UI.Models.PageDetailsModel

<div class="sectionWindow">
    <div class="btnToggleSection">Page Details +</div>
    <form id="DetailsForm" action="#" class="sectionContent">
        <div>
            @Html.LabelFor(m => m.DomainID)
            @Html.DropDownListFor(m => m.DomainID, this.ViewBag.Domains as SelectList, new { @class = "short", data_bind = "event: { change: onGetSections }" })
            @Html.HiddenFor(m => m.ContentID)
            @Html.HiddenFor(m => m.SiteMapID)
        </div>
        <div>
            @Html.LabelFor(m => m.Name)
            @Html.TextBoxFor(m => m.Name)
            @Html.ValidationMessageFor(m => m.Name)
        </div>
        <div>
            <div class="inputContainer">
            @Html.LabelFor(m => m.MenuText)
            @Html.TextBoxFor(m => m.MenuText)
            </div>
            <span class="description">The 'Menu Text' will be what shows on the front end of the website, the user will see this.</span>
        </div>
        <hr />
        <h2>Put this page</h2>
        <div>
            <div class="inputContainer"> 
            <label for="TopLevelRadio">Top Level</label>
            @Html.RadioButtonFor(m => m.TopLevel, true, new { id = "TopLevelRadio", data_bind = "click: onLevelRadioClick" })
            </div>
            <span class="description">Select 'Top Level' to make this a parent page (main page) </span>
        </div>
        <div>
            <div class="inputContainer">
            <label for="ChildLevelRadio">Under parent page...</label>
            @Html.RadioButtonFor(m => m.TopLevel, false, new { id = "ChildLevelRadio", data_bind = "click: onLevelRadioClick" })
            </div>
            <span class="description">Select this option to make this a sub-page, place the page under an existing parent page.</span>
        </div>
        <div data-bind="visible: isChildLevel">
            @Html.LabelFor(m => m.ParentID)
            <select id="ParentID" name="ParentID" class="short" data-bind="options: sections, optionsValue: 'Value', optionsText: 'Text', value: parentID, event: { change: onGetParentUrl }">
            </select>
        </div>
        <hr />
        <h2>@(Model != null ? Model.Name : String.Empty)</h2>
        <div>
            <div class="inputContainer">
            @Html.LabelFor(m => m.Path)
            <span data-bind="text: parentURL"></span> @Html.TextBoxFor(m => m.Path, new { @class = "short", disabled = "disabled" })
            @Html.ValidationMessageFor(m => m.Path)
            <a href="#" data-bind="click: onEditUrl">Edit</a>
            </div>
            <span class="description">This is what will show in the URL of the website. <b>Example</b>: /about-us/ </span>
        </div>
        <hr />
        <h2>Show this page in</h2>
        <div>
             <div class="inputContainer">
            @Html.LabelFor(m => m.Menu)
            @Html.RadioButtonFor(m => m.Menu, true, new { id = "radioMenuYes" })
            @Html.Label("LabelYes", "Yes", new { @for = "radioMenuYes", @class = "checkboxLabel" }) 
            @Html.RadioButtonFor(m => m.Menu, false, new { id = "radioMenuNo" })
            @Html.Label("LabelNo", "No", new { @for = "radioMenuNo", @class = "checkboxLabel" }) 
            </div>
            <span class="description">Show this page in the menu of the website.</span>
        </div>
        <div>
         <div class="inputContainer">
            @Html.LabelFor(m => m.Footer, "Footer")
            @Html.RadioButtonFor(m => m.Footer, true, new { id = "radioFooterYes" })
            @Html.Label("LabelYes", "Yes", new { @for = "radioFooterYes", @class = "checkboxLabel" }) 
            @Html.RadioButtonFor(m => m.Footer, false, new { id = "radioFooterNo" })
            @Html.Label("LabelNo", "No", new { @for = "radioFooterNo", @class = "checkboxLabel" }) 
            </div>
            <span class="description">Show this page in the footer of the website.</span>
        </div>
    </form>
</div>